package com.partners.dao.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * @author liangyongle
 * @date 2019-01-02
 */
@Data
public class UserInputDTO {

    private Integer id;

    @NotNull(message = "推荐人pid不能为空")
    private Integer pid;

    @NotNull(message = "用户名字不能为空")
    private String name;

    @NotNull(message = "电话号码不能为空")
    private Long phone;

    @NotNull(message = "角色id不能为空")
    @JsonProperty("role_id")
    private Integer roleId;

    @JsonProperty("group_id")
    private Integer groupId;

    @Override
    public String toString() {
        return "UserInputDTO{" +
            "id=" + id +
            ", pid=" + pid +
            ", name='" + name + '\'' +
            ", phone=" + phone +
            ", roleId=" + roleId +
            ", groupId=" + groupId +
            '}';
    }
}
